<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" type="text/css" href="/static/news/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/news/css/main.css">
    <script type="text/javascript" src="/static/news/js/jquery-1.12.4.min.js"></script>
</head>
<body>

<!-- 注册表单 -->
<form class="register_form_con" method="post" enctype="multipart/form-data">
    <div class="register_form">
        <div class="register_title">
            <h3>注 册</h3>
        </div>
            <h3 style="color: red;text-align: center">{{ get_flashed_messages()[0] }}</h3>
        <div class="form_group">
            <input type="text" name="name" placeholder="请输入用户名" class="phone_input">
        </div>
        <div class="form_group">
            <input type="password" name="password" id="register_password" class="pass_input"
                   placeholder="请输入密码">
        </div>
        <div class="form_group">
            <input type="text" name="phone" id="register_phone" class="pass_input" placeholder="请输入手机号">
        </div>
        <div class="form_group">
            <input type="file" name="photo" id="register_photo" class="pass_input">
        </div>
        <div class="form_group">
            <input type="text" name="code" id="imagecode" class="code_pwd" placeholder="请输入图像验证码">
            <img src="/code" class="get_pic_code" onclick="generateImageCode()">
        </div>

        <input type="submit" name="" value="注 册" class="input_sub">
        <div class="down_link">已有账号？<a href="/login" class="to_login">立即登录</a></div>

    </div>
</form>

<script>

    function generateImageCode() {
        $(".get_pic_code").attr("src", "/code?" + Math.random())
    }

</script>

</body>
</html>